package com.example.benwhite.smartboot;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

/**
 * Created by BenWhite on 2017/11/17.
 */

public class WeightActivity extends AppCompatActivity{


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.weight_test);
        Button trainStandard = (Button)findViewById(R.id.trainStandard);
        Button planeStandard = (Button)findViewById(R.id.planeStandard);

        trainStandard.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EditText detailStandard = (EditText)findViewById(R.id.detailStandard);
                detailStandard.setText("儿童（含免费儿童）10千克，外交人员35千克，其他旅客20千克");
            }
        });
        planeStandard.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EditText detailStandard = (EditText)findViewById(R.id.detailStandard);
                detailStandard.setText("头等舱40公斤，公务舱30公斤，经济舱20公斤，持婴儿票的旅客无免费行李额。");
            }
        });
    }
}
